﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model
{
    [Table("localidad")]
    public class Localidad
    {

        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [DisplayFormat(ConvertEmptyStringToNull = false)]
        public int id { get; set; }

        [DisplayFormat(ConvertEmptyStringToNull = false)]
        [Required(ErrorMessage = "Localidad es requerido")]
        [StringLength(50)]
        public string nombre { get; set; }

        [Required(ErrorMessage = "El Codigo es requerido")]
        [DisplayFormat(ConvertEmptyStringToNull = false)]
        public int codigo { get; set; }

        //[DisplayFormat(ConvertEmptyStringToNull = false)]
        //public virtual List<Darsena> darsenas { get; set; }



    

    }
}
